package cn.hznc.repository;

import cn.hznc.domain.entity.MachineToolTaskEntity;
import cn.hznc.domain.entity.UserEntity;
import cn.hznc.domain.request.process.EditActualTimeReq;
import cn.hznc.domain.request.process.EmployeeTasksReq;
import cn.hznc.domain.request.process.QueryEquipmentTaskListReq;
import cn.hznc.domain.request.schedule.*;
import cn.hznc.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @Author：Administrator
 * @Date：2023/4/26 21:04
 */
public interface MachineToolTaskRespository {


    List<EquipmentTaskBuildVo> selectEquipmentTaskList(QueryEquipmentTaskListReq queryEquipmentTaskListReq);

    List<EquipmentTaskBuildVo> selectTask(MachineToolChildReq machineToolChildReq);

    List<OrderTaskChildVo> selectChildListByTaskIdAndSeq(@Param("taskId") String taskId, @Param("seq") Integer seq);

    List<EmployeeRetrievalDetailVo> selectTaskByEmployeeId(@Param("id") Integer id);

    List<EmployeeRetrievalDetailVo> selectEmployeeTask(GetEmployeeTaskDetailReq getEmployeeTaskDetailReq);

    List<Integer> selectTaskByMachineToolIds(@Param("list")List<Integer> list , @Param("startTime")Date startTime , @Param("endTime")Date endTime);

    List<Integer> selectIdsByTaskIds(ToolDemandPredictionReq toolDemandPredictionReq);

    void  updataIsdone(@Param("taskId") String taskId, @Param("seq") Integer seq , @Param("actualEndTime")Date actualEndTime);


    List<MachineToolTaskEntity> selectIdsByCondition(@Param("taskIds") List<String> taskIds ,@Param("machineToolId") Integer machineToolId);

    List<MachineToolTaskEntity> selectIdsByConditionReload(@Param("taskIds") List<String> taskIds ,@Param("machineToolId") Integer machineToolId ,@Param("startTime") Date startTime , @Param("endTime") Date endTime );


    List<String> selectGroupTaskId(List<Integer> equipmentIds);


    List<MachineToolTaskEntity> queryCurrentTaskId(@Param("date") Date date , @Param("machineToolId") Integer machineToolId);

    List<MachineToolTaskEntity> selectEmployeeTaskList(EmployeeTasksReq employeeTasksReq);

    void editActualTime(EditActualTimeReq editActualTimeReq);

    List<MachineToolTaskEntity> selectByTaskIds(@Param("taskId") String taskId);

    MachineToolTaskEntity selectById(@Param("id") Integer id);

    List<MachineToolTaskEntity> selectListById(@Param("ids") List<Integer> ids);

    List<Integer> selectCurrentEmployee(@Param("machineToolName") String machineToolName,@Param("date") Date date);

    List<String> selectTaskIds(UnmetToolReq unmetToolReq);

    List<MachineToolTaskEntity> getTaskListByEquipmentName(@Param("machineToolId") Integer machineToolId);

    List<MachineToolTaskEntity> selectPreTask(@Param("nowDate") Date date, @Param("machineToolId") Integer machineToolId,@Param("machineToolStartTime") Date startTime);

    void confirmTask(@Param("id") Integer id,@Param("confirmFlag") Integer confirmFlag);

    void delete(@Param("id") Integer id);
}
